package com.msl.debezium.jdbc;

public class DataSourceContextHolder {

    //如果用线程，则仅发起的单次请求更换数据源，线程结束后失效
    //public static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<String>();

    public static String CONTEXT_HOLDER = new String();

    public static void setDataSourceType(String dsType) {
        //CONTEXT_HOLDER.set(dsType);
        CONTEXT_HOLDER = dsType;
    }

    public static String getDataSourceType() {
        //CONTEXT_HOLDER.get();
        return CONTEXT_HOLDER;
    }

    public static void removeDataSourceType() {
        //CONTEXT_HOLDER.remove();
        CONTEXT_HOLDER = new String();
    }

}